package com.example.mywiseelves.utils;

import android.graphics.Rect;
import android.view.View;

import androidx.recyclerview.widget.RecyclerView;

/**
 * @author ZJK
 * @data 2021 10
 * @description 修饰recyclerview适配器边距
 */
public class PaddingDecoration extends RecyclerView.ItemDecoration {
    private int distance;

    public PaddingDecoration(int distance) {
        this.distance = distance;
    }

    @Override
    public void getItemOffsets(Rect outRect, View view, RecyclerView parent, RecyclerView.State state) {
        outRect.bottom = distance;
    }
}
